package com.wenjie.original.entity.vo.SysDictType;

import com.wenjie.original.entity.SysDictType;
import com.wenjie.original.entity.common.vo.IResVo;
import com.wenjie.original.entity.common.vo.ISelVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

public class SysDictTypeVo {

    @Data
    public static class SelVo extends SysDictType implements ISelVo<SysDictType> {
        @ApiModelProperty("当前页")
        private Integer pn = 1;

        @ApiModelProperty("页数")
        private Integer ps = 10;

        @Override
        @NotBlank(message = "字典名称不能为空")
        @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符")
        public String getDictName() {
            return super.getDictName();
        }

        @Override
        @NotBlank(message = "字典类型不能为空")
        @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
        @Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头，且只能为（小写字母，数字，下滑线）")
        public String getDictType() {
            return super.getDictType();
        }

    }

    @Data
    public static class ResVo extends SysDictType implements IResVo<SysDictType> {

    }


}
